import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class Regexpression {

    public static void main( String args[] ){
/*
      // String to be scanned to find the pattern.
      String line = "This order was placed for QT3000! OK?";
      String pattern = "(.*)(\\d+)(.*)";

      // Create a Pattern object
      Pattern r = Pattern.compile(pattern);

      // Now create matcher object.
      Matcher m = r.matcher(line);
      if (m.find( )) {
         System.out.println("Found value: " + m.group(0) );
         System.out.println("Found value: " + m.group(1) );
         System.out.println("Found value: " + m.group(2) );
      } else {
         System.out.println("NO MATCH");
      }
*/      
      String c_line = "123This 43 all/n 452 53 4.4.34";
      String c_pattern = ".* all";
      Pattern c_r = Pattern.compile(c_pattern);
      Matcher c_m = c_r.matcher(c_line);
      System.out.println(c_m.toString());
      if (c_m.matches()){
    	  System.out.println("Yes !");
      } else {
    	  System.out.println("No !");
  	  }
      
      
      /*
      int i=0;
      while (c_m.find()){
    	  i++;
    	  System.out.println("Cousin find: " + c_m.start());
      }
      System.out.println("Cousin count: " + i );
      */
      
      
      
      }
}